package com.yanqu.road.entity.activity.goldautumn;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.List;
import java.util.Map;
import java.util.Set;

@FieldTypeAnnotation(tableName = "t_u_activity_gold_autumn_user_data")
public class GoldAutumnUserData extends DataObject {

    @FieldTypeAnnotation(desc = "活动ID", select = true, update = true)
    private int activityId;

    @FieldTypeAnnotation(desc = "用户ID", select = true, update = true)
    private long userId;

    @FieldTypeAnnotation(desc = "积分")
    private long score;

    @FieldTypeAnnotation(desc = "当前格子")
    private int curCellId;

    @FieldTypeAnnotation(desc = "最高格子（模板生成）")
    private int maxCellId;

    @FieldTypeAnnotation(desc = "历史总消耗")
    private int totalCost;

    @FieldTypeAnnotation(desc = "步数")
    private Set<Integer> stepSet;

    @FieldTypeAnnotation(desc = "格子")
    private List<GoldAutumnCell> cellList;

    @FieldTypeAnnotation(desc = "最后大奖的格子")
    private List<GoldAutumnCell> lastCellList;

    @FieldTypeAnnotation(desc = "buff")
    private Map<Integer, GoldAutumnBuff> buffMap;

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if(this.activityId != activityId) {
            this.activityId = activityId;
            setUpdateOption();
        }
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if(this.userId != userId) {
            this.userId = userId;
            setUpdateOption();
        }
    }

    public long getScore() {
        return score;
    }

    public void setScore(long score) {
        if(this.score != score) {
            this.score = score;
            setUpdateOption();
        }
    }

    public int getCurCellId() {
        return curCellId;
    }

    public void setCurCellId(int curCellId) {
        if(this.curCellId != curCellId) {
            this.curCellId = curCellId;
            setUpdateOption();
        }
    }

    public int getMaxCellId() {
        return maxCellId;
    }

    public void setMaxCellId(int maxCellId) {
        if(this.maxCellId != maxCellId) {
            this.maxCellId = maxCellId;
            setUpdateOption();
        }
    }

    public int getTotalCost() {
        return totalCost;
    }

    public void setTotalCost(int totalCost) {
        if(this.totalCost != totalCost) {
            this.totalCost = totalCost;
            setUpdateOption();
        }
    }

    public Set<Integer> getStepSet() {
        return stepSet;
    }

    public void setStepSet(Set<Integer> stepSet) {
        this.stepSet = stepSet;
        setUpdateOption();
    }

    public List<GoldAutumnCell> getCellList() {
        return cellList;
    }

    public void setCellList(List<GoldAutumnCell> cellList) {
        this.cellList = cellList;
        setUpdateOption();
    }

    public void addCellList(List<GoldAutumnCell> cellList){
        this.cellList.addAll(cellList);
        setUpdateOption();
    }

    public List<GoldAutumnCell> getLastCellList() {
        return lastCellList;
    }

    public void setLastCellList(List<GoldAutumnCell> lastCellList) {
        this.lastCellList = lastCellList;
        setUpdateOption();
    }

    public Map<Integer, GoldAutumnBuff> getBuffMap() {
        return buffMap;
    }

    public void setBuffMap(Map<Integer, GoldAutumnBuff> buffMap) {
        this.buffMap = buffMap;
        setUpdateOption();
    }
}
